package com.sinosoft.cloud.access.net;

import com.sinosoft.cloud.access.entity.TranData;

/**
 * cloud-netty
 *
 * @title: cloud-netty
 * @package: com.sinosoft.cloud.access.net
 * @author: yangming
 * @date: 2017/12/2 下午4:03
 */
public class MessageObject {

    /*原始报文*/
    private final String originalMsg;
    /*原始报文明文*/
    private String decryptMsg;
    /*转换后标准报文*/
    private String standardMsg;
    /*转换后 TranData */
    private TranData tranData;
    /*返回报文*/
    private String sendToBankMsg;
    /*下步操作*/
    private Type next;
    /*是否出现错误*/
    private Boolean hasError = false;
    /*交易编码*/
    private String transCode;

    public MessageObject(String originalMsg) {
        this.originalMsg = originalMsg;
    }

    public String getOriginalMsg() {
        return originalMsg;
    }

    public String getDecryptMsg() {
        return decryptMsg;
    }

    public void setDecryptMsg(String decryptMsg) {
        this.decryptMsg = decryptMsg;
    }

    public String getStandardMsg() {
        return standardMsg;
    }

    public void setStandardMsg(String standardMsg) {
        this.standardMsg = standardMsg;
    }

    public TranData getTranData() {
        return tranData;
    }

    public void setTranData(TranData tranData) {
        this.tranData = tranData;
    }

    public String getSendToBankMsg() {
        return sendToBankMsg;
    }

    public void setSendToBankMsg(String sendToBankMsg) {
        this.sendToBankMsg = sendToBankMsg;
    }

    public Type getNext() {
        return next;
    }

    public void setNext(Type next) {
        this.next = next;
    }

    public enum Type {
        writeAndFlush, fireChannelRead, shutDown
    }

    public Boolean getHasError() {
        return hasError;
    }

    public void setHasError(Boolean hasError) {
        this.hasError = hasError;
    }

    public String getTransCode() {
        return transCode;
    }

    public void setTransCode(String transCode) {
        this.transCode = transCode;
    }
}
